import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Me from '../views/Me.vue'
import PlayListDetail from '../components/playListDetail/PlayListDetail.vue'
import RankListDetail from '../components/rank/RankListDetail.vue'
import Player from '../components/player/Player.vue'
import MvListdetail from '../components/mvList/MvListdetail.vue'
import MvPlayer from '../components/mvPlayer/MvPlayer.vue'
import SingerList from '../components/singer/SingerList.vue'



import MvList from "../views/MvList.vue"
import Singer from "../components/home/Singer.vue"
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true
    }
  },
  {
    path: "/MvList",
    name: "MvList",
    component: MvList,
    meta: {
      showTab: true
    }
  },
  {
    path: "/Singer",
    name: "Singer",
    component: Singer,
    meta: {
      showTab: true
    }
  },
  {
    path: '/rank',
    name: 'Rank',

    // component:Rank
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Rank.vue'),
    meta: {
      showTab: true
    }

  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/Search.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/Search.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/me',
    name: 'Me',
    component: Me,
    meta: {
      showTab: false
    }
  },
  {
    path: '/PlayListDetail/:id',
    name: 'PlayListDetail',
    component: PlayListDetail,
    meta: {
      showTab: false
    }

  },
  {
    path: '/RankListDetail/:id',
    name: 'RankListDetail',
    component: RankListDetail,
    meta: {
      showTab: false
    }
  },
  {
    path: '/Player/:id',
    name: 'Player',
    component: Player,
    meta: {
      showTab: false
    }

  },

  {
    path: '/mvlistdetail/:id',
    name: 'MvListdetail',
    component: MvListdetail,
    meta: {
      showTab: false
    }
  },
  {
    path: '/singerlist/:id',
    name: 'SingerList',
    component: SingerList,
    meta: {
      showTab: false
    }
  },
  {
    path: '/mvplayer/:id',
    name: 'MvPlayer',
    component: MvPlayer,
    meta: {
      showTab: false
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
